﻿-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Ivy_Flat_GetByID]') AND type in (N'P', N'PC'))
DROP PROCEDURE [Ivy_Flat_GetByID]
GO



CREATE PROCEDURE [Ivy_Flat_GetByID]
-- =============================================
-- Author:			<Sagar sk>
-- Create date:		<15/08/2014>
-- Description:		<Ivy_Flat_GetByID>
-- Modified by:		<Mrinmoy Das>
-- Modified date:	<27/10/2014>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@FlatKey int
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

	SELECT	
				
				[FlatKey],
				[FlatSocietyKey],
				[FlatNumber],
				[FlatFloorNumber],
				[FlatType],
				[FlatBlockName],
				[FlatOccupancy],
				[FlatNumberOfBedrooms],
				[FlatNumberOfKitchen],
				[FlatNumberOfToilets],
				[FlatNumberOfLivingroom],
				[FlatNumberOfStudyroom],
				[FlatNumberOfBalcony],
				[FlatTotalArea],
				[FlatNumberOfWaterInlet],
				[Sys_DateOfCreation],
				[Sys_DateOfModification],
				[Sys_CreatedByID],
				[Sys_ModifiedByID],
				[Sys_DeleteType],
				[Sys_IsDeleted],
				[Sys_OrganizationID],
				[Sys_InitialPrimaryKeys],
				[Sys_WorkstationName]
	FROM	[Flat]
	WHERE		
		(
			[FlatKey] = @FlatKey
		);
END



GO


